package com.chaobl.goods.shop.service;

import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RedisService {
    @Resource
    ValueOperations<String, Object> valueOperations;

    public void set(String key, Object obj) {
        valueOperations.set(key, obj);
    }

    public Object get(String key) {
        return valueOperations.get(key);
    }
}

